home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / m_allocate < prev    next >
Text File  |  2001-04-06  |  895b  |  24 lines

  1. SYNOPSIS
  2.         mapping m_allocate(int size, int width)
  3.  
  4. DESCRIPTION
  5.         Reserve memory for a mapping.
  6.  
  7.         size is the number of entries (i.e. keys) to reserve, width is
  8.         the number of data items per entry. If the optional width is
  9.         omitted, 1 is used as default.
  10.  
  11.         This is useful only when you are going to construct a mapping
  12.         whose approximate size you know beforehand, to save on malloc
  13.         overhead. If you don't fill in data for all the allocated
  14.         elements, any leftovers will be freed after the current
  15.         function execution ended. It is also useful if you want the
  16.         mapping to have a certain width even if you don't provide
  17.         all the data items for the keys yet.
  18.         
  19. HISTORY
  20.         Renamed from 'allocate_mapping' in LDMud 3.2.6.
  21.  
  22. SEE ALSO
  23.         mappings(LPC), walk_mapping(E), get_type_info(E), m_reallocate(E)
  24.